// session.cpp
#include "session.h"

QString Session::currentUsername = "";
int Session::visitorId = 16; // 默认无效id
bool Session::adminFlag = false;  // 默认为非管理员

void Session::setUsername(const QString &username)
{
    currentUsername = username;
}

QString Session::getUsername()
{
    return currentUsername;
}

void Session::setVisitorId(int id)
{
    visitorId = id;
}

int Session::getVisitorId()
{
    return visitorId;
}

void Session::setIsAdmin(bool admin)
{
    adminFlag = admin;
}

bool Session::isAdmin()
{
    return adminFlag;
}
